import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'

const routes: Array<RouteRecordRaw> = [
    {
        path: '/home',
        name: 'Home',
        component: () => import('@/page/home/home.vue')
    },
    {
        path: '/about',
        name: 'About',
        component: () => import('@/page/about/about.vue')
    },
    {
        path: '/setting',
        name: 'Setting',
        component: () => import('@/page/setting/setting.vue')
    },
    {
        path: '/game',
        name: 'Game',
        component: () => import('@/page/game/game.vue')
    },
    { path: '/', redirect: { name: 'Home' } }
]

const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router

